package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update

@Dao
interface TaskDao {

    //提交任务
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(task: Task):Long

    /**
     * 审批
     */
    @Update
    fun update(task: Task):Int


    /**
     * 查看所有未审核的任务列表
     */
    @Query("select * from task order by time")
    fun queryNoApprove():List<Task>?
}